﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BarCodeWRL.aspx.cs" Inherits="Ewts.Storage.BarCodeWRL" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>称重标签打印</title>
 
 
<style type="text/css">
body {
	margin: 0px;
	padding: 0px;
	font-size:22px;
}
tr.barcode_tr
{
    height:46px;
}
td.barcode_td12
{
    font-size:12px;
}
table.barcode_tb
{
    position:relative;
    left:6px;
    top:18px;
}
table.barcode_tb2
{
    position:relative;
    left:6px;
    top:10px;
}
td.barcode_td_x
{
    text-align:center;
    white-space:nowrap;
    padding:0px;
    padding-right:5px;
    margin:0px;
}
</style>

</head>
<body>
<div id="idobj">
    <object id="secmgr" codebase="smsx.cab#Version=6,5,439,72" classid="clsid:5445BE81-B796-11D2-B931-002018654E2E" viewastext>
        <param name="GUID" value="{8C605D40-A0B9-CE77-D0C7-3BD0288E9BD6}" />
        <param name="PATH" value="sxlic.mlf" />
        <param name="REVISION" value="0" />
        <param name="PerUser" value="true" />
    </object>
    <object id="factory" classid="clsid:1663ED61-23EB-11D2-B92F-008048FDD814"  viewastext>
        <param name="template" value="MeadCo://IE7"/>
    </object>
</div>  
    <form id="form1" runat="server">   
<table class="barcode_tb" cellpadding="2" cellspacing="0" width="380px" border="1">
  <tr class="barcode_tr">
    <td width="80px" align="center">日期</td>
    <td colspan="3" align="right"><label id="lblDate" runat="server"></label></td>

  </tr>
  <tr class="barcode_tr">
    <td align="center">Load NO.</td>
    <td align="right" width="130px"><label id="lblLoadNum" runat="server"></label></td>
    <td width="50px" align="center">批次</td>
    <td align="right"><label id="lblNo" runat="server"></label></td>
  </tr>
 <tr class="barcode_tr">
    <td align="center">客户名称</td>
    <td colspan="3" align="right"><label id="lblCustomerName" runat="server"></label></td>

  </tr>
  <tr class="barcode_tr">
    <td align="center">货物代码</td>
    <td colspan="3" align="right"><label id="lblGoodsCode" runat="server"></label></td>
  </tr>
  <tr class="barcode_tr">
    <td align="center">名称</td>
    <td colspan="3" align="right"><label id="lblGoodsName" runat="server"></label></td>
   
  </tr>
  
   <tr class="barcode_tr">
    <td style="text-align:center; ">毛重</td>
    <td width="120px" align="right"><label id="lblGwt" runat="server"></label>kg</td>
    <td width="50px" align="center">T1</td>
    <td align="right"><label id="lblTare1" runat="server"></label>kg</td>
  </tr>
   <tr class="barcode_tr">
    <td align="center">净重</td>
    <td width="120px" align="right"><label id="lblNwt" runat="server"></label>kg</td>
    <td width="50px" align="center">T2</td>
    <td align="right"><label id="lblTare2" runat="server"></label>kg</td>
  </tr>
    <tr class="barcode_tr">
    <td align="center">数量</td>
    <td colspan="3" align="right"><label id="lblQty" runat="server"></label></td>
  </tr>
  <tr class="barcode_tr">
    <td align="center">特殊要求</td>
    <td class="barcode_td12" colspan="3" align="right"><label id="lblSpecial" runat="server"></label></td>
   
  </tr>
    <tr class="barcode_tr">
    <td align="center">备注</td>
    <td class="barcode_td12" colspan="3" align="right"><label id="lblRemark" runat="server"></label></td>
  </tr>

  <tr class="barcode_tr">
  <td align="center" class="style2">条码</td>
    <td colspan="3" align="center" class="style2">
        <table>
            <tr style="vertical-align:bottom; line-height:2px;position:relative; bottom:-3px;">
                <td><asp:Image ID="img1" runat="server" /></td>

            </tr>
            <tr style=" vertical-align:top; line-height:1px;position:relative; top:-25px;">
                <td>
                    <font size="2">
                        <label id="lblBarCode" runat="server"></label>
                    </font>
                </td>
            </tr>
        </table>
        
       </td>
  </tr>
  

  
</table> 
    <br />
<table class="barcode_tb2" cellpadding="0" cellspacing="0" width="380px" border="0">
    <tr>
  <td style="width:100px;">&nbsp;</td>
  <td>
    <table>
        <tr style="vertical-align:middle; line-height:0px;position:relative; bottom:0px; padding:0px; margin:0px;">
        <td class="barcode_td_x"><font size="1"><label id="lblcutomer" runat="server"/></font></td>
        <td class="barcode_td_x"><font size="1">净重:<label id="lblnwt_b" runat="server"/>kg</font></td>
        <td class="barcode_td_x"><font size="1">数量:<label id="lblxl_b" runat="server"/></font></td>
        </tr>
        <tr style="vertical-align:bottom; line-height:0px;position:relative; bottom:0px; top:0px; height:25px;">
            <td colspan="3" style="text-align:left; height:29px;">
                 <asp:Image ID="img2" runat="server" />
            </td>
        </tr>
        <tr style=" vertical-align:middle; height:7px; line-height:1px;position:relative; top:0px;">
            <td colspan="3" style="text-align:center;">
                <font size="1">
                    <label id="lblBarCode2" runat="server"></label>
                </font>
            </td>
        </tr>
        </table>
        </td>
        </tr></table>
<!--endprint-->
<script language="Javascript" type="text/javascript">

    function getPrintName() {
        var printname = "0";
        var index = 0;
        while (1) {
            if (printname != "" && printname != null) {
                printname = factory.printing.EnumPrinters(index);
                if (printname.indexOf("打印机2") != "-1") {
                    break;


                }
                index++;
            }
            else {
                break;
            }

        }
        return printname;
    }

    function PrintSetup() {
         document.getElementById("idobj").style.display = "none"; //显示按钮
         factory.printing.printer = getPrintName(); //指定使用的打印机
        factory.printing.paperSize = "WRL"; //指定使用的纸张
        factory.printing.header = "";
        factory.printing.footer = "";
        factory.printing.leftMargin = 0;
        factory.printing.rightMargin = 0;
        factory.printing.topMargin = 0;
        factory.printing.bottomMargin = 0;

    }

    window.onload = function() {
        PrintSetup();
        factory.printing.Print(false); //无确认打印，true时打印前需进行确认
        window.opener = null;
        window.open("", "_self");
        window.close();
    }


</script>
    </form>
</body>
</html>